Image processing apparatus and method

ABSTRACT

An apparatus for performing image processing on image data including a memory color includes: a characteristic value calculation part calculating a characteristic value from the image data; an area extraction part extracting a specific color area and its background area from the image data, using the characteristic value and the color information of the memory color stored in a storage part; a target value calculation part calculating a target value for correcting the preferable color of the specific color from the characteristic value, the extracted specific color and background areas, and the color information of the preferable color; and an image data correction part calculating a correction for correcting the preferable color based on the calculated target value and the characteristic value, and correcting a color of the specific color area based on the calculated correction and the characteristic value.

BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] The present invention generally relates to image processing apparatuses and image processing methods, and more particularly to an image processing apparatus and an image processing method for processing image data including a memory color, a program causing a computer to execute such a method, and a computer-readable recording medium on which such a program is recorded.

[0003] 2. Description of the Related Art

[0004] Progress in digital technology has made it common to output image data input through input apparatuses such as a digital camera and a network scanner from output apparatuses such as an ink-jet printer, a laser printer, and a digital proofer. Generally, image data input from an image data input apparatus is subjected to a variety of processing by an image processing apparatus or an image processing method causing the image processing apparatus to operate, and is output.

[0005] Under such circumstances, a variety of images are processed so that a wide variety of requests as to image quality have been made to image data. Particularly, the reproduction of colors referred to as memory colors such as skin color (skin tones), grass green, and sky blue, which are frequently seen in our daily life, is considered to be important.

[0006] Particularly, the skin color of a human image is an image quality factor that attracts the most attention. Accordingly, techniques for correcting the skin color of a human image to an appropriate color have been disclosed.

[0007] For instance, according to Japanese Laid-Open Patent Application No. 2000-242775 (Prior Art 1), a facial area is extracted from an image including a man, and color density information representing color and/or density (color density) around the facial area is detected. The color density of the facial area is adjusted based on the color density information. The adjusted image is reproduced so that the facial area of an appropriate color density unaffected by the color density around the facial area is perceived.

[0008] Meanwhile, according to Japanese Laid-Open Patent Application No. 2001-186323 (Prior Art 2), a skin-colored area is extracted from a human image included in image data, and the skin color of the extracted skin-colored area is compared with a prepared skin color correction target value to calculate a skin color correction. The color of the skin-colored area of the human image is corrected based on the calculated skin color correction. Thereby, the skin color of a man in an identification photograph can be made closer to an actual skin color.

[0009] Further, it is well know that in recognizing the color and the density of a certain area, human vision is affected by color and density around the area, as described, for instance, in “Color Appearance Model,” M. D. Fairchild, ADDISON-WESLEY, 1998. That is, even if the density of an area remains the same, the area seems bright if it is dark around the area, and the area seems dark if it is bright around the area.

[0010] For instance, when areas of the uniform gray density are observed against a background having the same gray density as those areas, those areas are perceived as having the same density. On the other hand, when the areas are observed against black and white, respectively, the areas are perceived as having different densities depending on their respective background colors.

[0011] Accordingly, even when only a skin-colored area is processed to have an appropriate color and density as described in Prior Art 2, a perceived facial area may be affected by the color and the density of the peripheral area to have an inappropriate color and density.

[0012] Further, according to Prior Art 1, the color and the density of a skin-colored area is appropriately corrected considering the color and the density of its peripheral area. However, a preferable color is prevented from being reproduced in some cases.

[0013] For instance, in the case of an image in which a skin-colored area exists in a preferable range as a whole and its peripheral area is tinged with blue as a whole, color correction to reduce blueness, that is, add yellowness, is performed on the entire image so as to perform correction to balance chromaticness over the entire image (so-called white balance correction).

[0014] The same color correction is performed on the skin-colored area so that the color of the skin-colored area may be offset from the center of a preferable skin color. A description is given, with reference to FIG. 1, of this problem.

[0015]FIG. 1 is a diagram for illustrating color correction according to Prior Art 1. In FIG. 1, a skin-colored area and an area of a color other than a skin color (hereinafter referred to as a background area) that are extracted from image data are plotted in the CIELAB uniform color space.

[0016] Referring to FIG. 1, the psychometric chroma coordinates of chromaticness are shown two-dimensionally. The horizontal axis represents chromaticness in the red-green direction (a*), and the vertical axis represents chromaticness in the yellow-blue direction (b*). Point S represents the skin-colored area of the image data before correction, and Point R₁ represents the chromaticness of the background area before correction. It is assumed that the chromaticness of the skin-colored area of the image data exists in a preferable skin-color range (indicated by hatching). Naturally, in this case, the skin-colored area (point S) is perceived as a preferable skin color.

[0017] However, in the case of image data tinged with blue over the entire image whose background area before correction is indicated by Point R₂, correction to reduce blueness is performed on the entire image. Accordingly, correction to add yellowness to the entire image data is performed on the entire image. As a result, referring to FIG. 1, the background area is corrected from Point R₂ to Point R₂′.

[0018] Meanwhile, the same color correction is performed on the image data of the skin-colored area so that the skin-colored area is corrected from Point S to Point S′. That is, although the colors are balanced over the entire image, the color of the skin-colored area is slightly more yellowish than a preferable skin color in the obtained image. That is, the skin-colored area of this image data is not perceived as a preferable skin color.

SUMMARY OF THE INVENTION

[0019] Accordingly, it is a general object of the present invention to provide an image processing apparatus and method in which the above-described disadvantage is eliminated.

[0020] A more specific object of the present invention is to provide an image processing apparatus and method that can correct the color of a memory color in image data in accordance with the peripheral area of the memory color and the characteristics of the image data so that a color perceived as preferable is always obtained.

[0021] Another more specific object of the present invention is to provide a program for causing a computer to execute such a method, and a computer-readable recording medium on which such a program is recorded.

[0022] One or more of the above objects of the present invention are achieved by an apparatus for performing image processing on image data including a memory color, including: a characteristic value calculation part calculating a characteristic value from the image data; an area extraction part extracting a specific color area of a specific color and a background area thereof from the image data, using the characteristic value and color information of the memory color stored in a storage part; a target value calculation part calculating a target value for correcting a preferable color of the specific color from the characteristic value, the extracted specific color and background areas, and color information of the preferable color stored in the storage part; and an image data color correction part calculating a correction for correcting the preferable color based on the calculated target value and the characteristic value, and correcting a color of the specific color area based on the calculated correction and the characteristic value.

[0023] One or more of the above objects of the present invention are also achieved by an apparatus for performing image processing on image data including a memory color, including: an area extraction part extracting a specific color area of a specific color and a background area thereof from the image data, using color information of the memory color stored in a storage part; a characteristic value calculation part calculating a characteristic value of at least one of the specific color area and the background area; a target value calculation part calculating a target value and a correction for correcting a preferable color of the specific color from a result of the calculation by the characteristic value calculation part and color information of the preferable color stored in the storage part; and an image data correction part correcting a color of the specific color area based on the correction calculated by the target value calculation part.

[0024] One or more of the above objects of the present invention are also achieved by an apparatus for performing image processing on image data including a human image, including: an area extraction part extracting an area of a skin color and a background area thereof from the image data, using color information of a memory color stored in a storage part; a characteristic value calculation part calculating a characteristic value of at least one of the area of the skin color and the background area; a target value calculation part calculating a target value and a correction for correcting a preferable color of the skin color from a result of the calculation by the characteristic value calculation part and color information of the preferable color stored in the storage part; and an image data correction part correcting a color of the area of the skin color based on the correction calculated by the target value calculation part.

[0025] One or more of the above objects of the present invention are achieved by a method of performing image processing on image data including a memory color, the method including the steps of: (a) calculating a characteristic value from the image data; (b) extracting a specific color area of a specific color and a background area thereof from the image data, using the characteristic value and color information of the memory color stored in a storage part; (c) calculating a target value for correcting a preferable color of the specific color from the characteristic value, the extracted specific color and background areas, and color information of the preferable color stored in the storage part; and (d) calculating a correction for correcting the preferable color based on the calculated target value and the characteristic value, and correcting a color of the specific color area based on the calculated correction and the characteristic value.

[0026] One or more of the above objects of the present invention are also achieved by a method of performing image processing on image data including a memory color, including the steps of: (a) extracting a specific color area of a specific color and a background area thereof from the image data, using color information of the memory color stored in a storage part; (b) calculating a characteristic value of at least one of the specific color area and the background area; (c) calculating a target value and a correction for correcting a preferable color of the specific color from a result of the calculation by the step (b) and color information of the preferable color stored in the storage part; and (d) correcting a color of the specific color area based on the correction calculated by the step (c).

[0027] One or more of the above objects of the present invention are also achieved by a method of performing image processing on image data including a human image, including the steps of: (a) extracting an area of a skin color and a background area thereof from the image data, using color information of a memory color stored in a storage part; (b) calculating a characteristic value of at least one of the area of the skin color and the background area; (c) calculating a target value and a correction for correcting a preferable color of the skin color from a result of the calculation by the step (b) and color information of the preferable color stored in the storage part; and (d) correcting a color of the area of the skin color based on the correction calculated by the step (c).

[0028] One or more of the above objects of the present invention are also achieved by a program for causing a computer to execute a method according to the present invention.

[0029] One or more of the above objects of the present invention are further achieved by a computer-readable recording medium on which a program for causing a computer to execute a method according to the present invention is recorded.

BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Other objects, features and advantages of the present invention will become more apparent from the following detailed description when read in conjunction with the accompanying drawings, in which:

[0031]FIG. 1 is a diagram for illustrating a problem in the correction of a preferable skin color according to prior art;

[0032]FIG. 2 is a block diagram showing a functional configuration of an image processing apparatus according to a first embodiment of the present invention;

[0033]FIG. 3 is a diagram for illustrating the color information of a memory (skin) color and the setting of a preferable skin color according to the first embodiment of the present invention;

[0034]FIGS. 4A and 4B are diagrams for illustrating the splitting of the original image data into areas according to the first embodiment of the present invention;

[0035]FIG. 5 is a diagram showing a characteristic data table according to the first embodiment of the present invention;

[0036]FIG. 6 is a diagram showing the results of the mapping of chromaticity coordinates in each area of FIG. 4B into the CIELAB uniform color space according to the first embodiment of the present invention;

[0037]FIG. 7 is a diagram for illustrating a method of calculating a correction according to the first embodiment of the present invention;

[0038]FIG. 8 is a diagram for illustrating the relationship between the correction and the distance between a specific color area to be subjected to correction and its background area according to the first embodiment of the present invention;

[0039]FIG. 9 is a block diagram showing a functional configuration of the image processing apparatus according to a second embodiment of the present invention;

[0040]FIG. 10 is a diagram showing an Exif-based file structure storing the attribute information of the original image data according to the second embodiment of the present invention;

[0041]FIG. 11 is a diagram showing a correction factor table corresponding to a scene capture type according to the second embodiment of the present invention;

[0042]FIG. 12 is a flowchart showing a procedure for correction in the image processing apparatus according to the first and second embodiments of the present invention;

[0043]FIG. 13 is a block diagram showing a configuration of the image processing apparatus according to a third embodiment of the present invention;

[0044]FIG. 14 is a diagram for illustrating the calculation of a characteristic value, a target value, and a correction according to the third embodiment of the present invention;

[0045]FIGS. 15A and 15B are diagrams for illustrating an extracted skin-colored area and background area according to the third embodiment of the present invention;

[0046]FIG. 16 is a schematic graph of a frequency distribution of luminance in a luminance plane according to the third embodiment of the present invention;

[0047]FIG. 17 is a schematic graph of a frequency distribution of chroma in a chroma plane according to the third embodiment of the present invention;

[0048]FIG. 18 is a graph for illustrating the calculation of the correction from the characteristic value relating to the luminance of the background area according to the third embodiment of the present invention;

[0049]FIG. 19 is a graph for illustrating the calculation of the correction from the characteristic value relating to the chroma of the skin-colored area according to the third embodiment of the present invention;

[0050]FIG. 20 is a block diagram showing a configuration of the image processing apparatus according to a fourth embodiment of the present invention;

[0051]FIG. 21 is a diagram showing a correction factor table corresponding to a scene capture type according to the fourth embodiment of the present invention; and

[0052]FIG. 22 is a flowchart showing a procedure for correction in the image processing apparatus according to the third and fourth embodiments of the present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0053] A description is given, with reference to the accompanying drawings, of embodiments of the present invention.

[0054] [First Embodiment]

[0055]FIG. 2 is a block diagram showing a functional configuration of an image processing apparatus according to a first embodiment of the present invention. Referring to FIG. 2, image data is input from an image data input part 10, subjected to color correction in a color correction unit 100, and output from an image data output part 30.

[0056] The color correction unit 100 includes a unit controller 101, a characteristic value calculation part 103, an area extraction part 105, a target value calculation part 107, a storage part 109, and an image data correction part 111.

[0057] The unit controller 101 controls the entire color correction unit 100. The characteristic value calculation part 103 calculates the characteristic values of the image data input from the image input part 10, which is hereinafter also referred to as the original image data, and outputs the characteristic value table of the original image data. The area extraction part 105 extracts a specific color area to be subjected to color correction and its background area included in the original image data, referring to the color information of a memory color stored in the storage part 109. The target value calculation part 107 calculates the target value of a preferable color after color correction for the specific color from the color information of the extracted specific color area and background area and preferable color information for the specific color obtained from the storage part 109. The image data correction part 111 calculates a correction (amount) in accordance with the calculated target value of the preferable memory color and characteristic values obtained from the characteristic value table of the original image data. Then, the image data correction part 111 obtains image data by performing color correction on the original image data by the calculated amount. The obtained image data is hereinafter also referred to as corrected image data.

[0058] The image data input part 10 may be connected to a network such as the Internet through a network interface provided to the image processing apparatus so that image data can be input from outside via the network. Alternatively, image data may be input from apparatuses connected to the image processing apparatus, such as a hardware disk drive, a flexible disk drive, an optical recording medium reader, a scanner, and a digital camera.

[0059] When the input image data is an analog signal, the image data input part 10 converts the input image data into a digital signal. Then, the image data input 10 performs predetermined digital processing on the input image data, and outputs the image data to the color correction unit 100 as digital signals of R (red), G (green), and B (blue).

[0060] In this embodiment, the RGB color space is employed for the input signal, and the Lab color space is used for characteristic value calculation and area extraction. However, the present invention is not limited to these color spaces, and may also employ the YCC color space or the Luv color space.

[0061] The storage part 109 stores the chromaticity information of memory colors and the color information of a preferable color (preferable color information) for each memory color. The chromaticity information is stored as extraction conditions for extracting a specified memory color from the original image data. The memory colors are colors memorized by a man, such as the colors of skin, sky, ocean, river, grass and trees, and snow.

[0062] Next, a description is given of a method of setting the color of skin (skin color) of those memory colors, and a method of setting the color information of a preferable skin color.

[0063] Method of Setting a Skin Color:

[0064] As a method of setting a skin color, for instance, such ranges as defined in “Skin Tone Color” by Japan Color Research Institute may be prestored as follows:

[0065] Hue (H): 1YR˜9YR

[0066] Chroma (C): 3, 4, and 5

[0067] Value (V): 4.0˜8.5

[0068] The value of HV/C employed herein is converted into HV/C (HVC_(JIS)) and the corresponding xy chromaticity coordinates by:

x _(JIS)=ƒ(H _(JIS) ·V _(JIS) ·C _(JIS))

y _(JIS)=ƒ(H _(JIS) ·V _(JIS) ·C _(JIS))

V_(JIS)=V_(JIS)  (1)

[0069] as illustrated in “Colour specification-Specification according to their three attributes” in JIS (Japanese Industrial Standards Z 8721.

[0070] Next, values in an appropriate uniform color space are obtained from the obtained x, y, and V (xy_(JIS)) coordinates by: $X = {\frac{x_{JIS}}{y_{JIS}} \cdot V_{JIS}}$

$\begin{matrix} {{Y = V_{JIS}}{Z = {\frac{1 - x_{JIS} - y_{JIS}}{y_{JIS}} \cdot V_{JIS}}}} & (2) \\ {{L^{*} = {{{116 \cdot \left( \frac{Y}{Y_{n}} \right)^{\frac{1}{3}}} - 16} = {{116 \cdot 7.787 \cdot \left( {\frac{Y}{Y_{n}} + \frac{16}{116}} \right)} - 16}}}{a^{*} = {500 \cdot \left\{ {{f\left( \frac{X}{X_{n}} \right)} - {f\left( \frac{Y}{Y_{n}} \right)}} \right\}}}{b^{*} = {200 \cdot \left\{ {{f\left( \frac{Y}{Y_{n}} \right)} - {f\left( \frac{Z}{Z_{n}} \right)}} \right\}}}{{f\left( \frac{T}{T_{n}} \right)} = {\left( \frac{T}{T_{n}} \right)^{\frac{1}{3}} = {7.787 \cdot \left( {\frac{T}{T_{n}} + \frac{16}{116}} \right)}}}} & (3) \end{matrix}$

[0071] In this embodiment, the range of a skin-colored area is calculated by calculating the tristimulus values (X, Y, Z) of the CIE 1931 standard colorimetric system (CIEXYZ 1931) and the CIELAB values. FIG. 3 is a diagram showing a skin-color range. An ellipsoid including 90% of the Lab values of the obtained points may be defined, and the range of the ellipsoid may be defined as a skin-color range.

[0072] Letting the coordinates of the intersections U₁ and U₂ of the periphery of the above-described skin-color range and the line segments connecting the periphery and the origin be (L*(U₁), a*(U₁), b*(U₁)) and (L*(U₂), a*(U₂), b*(U₂)), respectively, and letting the coordinates of the intersections U₃ and U₄ of the periphery of the above-described skin-color range and the line segments connecting the center of the ellipsoid and the origin be (L*(U₃), a*(U₃) b*(U₃)) and (L*(U₄), a*(U₄), b*(U₄)), respectively, it is possible to set the maximum and minimum hue and chroma values of the four points as the skin-color range.

[0073] Further, at the time of the conversion into values in an appropriate equivalent color space, it is required to set an environment for color observation. For instance, in Equation (1), the color observation environment is limited to an observation environment at a light source. Therefore, a skin-colored area in another observation environment cannot be defined.

[0074] However, a user observes image data in a variety of environments. Therefore, it is desirable to convert the CIEXYZ 1931 tristimulus values calculated from Equation (1) by applying, for instance, a color appearance model such as the von Kries model or CIECAM in accordance with color appearances by various light sources (under various lighting conditions). It is necessary to specify observation environment parameters to perform the conversion. It is suitable that characteristic values are preset for the parameters, and are changed when the user specifies the values of the parameters.

[0075] Method of Setting a Preferable Skin Color:

[0076] Next, a description is given of a method of setting the color information of a preferable skin color.

[0077] First, a plurality of image data items each containing a skin color are collected, and one or more of the image data items are subjectively selected through subjective close examination. Then, subjective evaluation as to whether the selected image data is “preferable” or “not preferable” is performed.

[0078] The chromaticity coordinates of the skin color of image data determined as having a high subjective evaluation point are employed. The principal components of the employed chromaticity coordinates are analyzed using Equation (4) so as to calculate the first, second, and third principal component vectors and their respective eigen values. $\begin{matrix} {{\begin{bmatrix} P_{1} \\ P_{2} \\ P_{3} \end{bmatrix} = {\begin{bmatrix} p_{11} & p_{12} & p_{13} \\ p_{21} & p_{22} & p_{23} \\ p_{31} & p_{32} & p_{33} \end{bmatrix}\quad\begin{bmatrix} L^{*} \\ a^{*} \\ b^{*} \end{bmatrix}}}{{\left( \frac{P_{1}}{\sqrt{\lambda_{1}}} \right)^{2} + \left( \frac{P_{2}}{\sqrt{\lambda_{2}}} \right)^{2} + \left( \frac{P_{3}}{\sqrt{\lambda_{3}}} \right)^{2}} = 1}} & (4) \end{matrix}$

[0079] where P₁, P₂, and P₃ are the first, second, and third components, respectively, λ₁, λ₂, and λ₃ are the eigen values of the first, second, and third components, respectively, and p₁₁ through p₃₃ are constants.

[0080] Letting the center of the calculated ellipsoid be the center coordinates R of a preferable skin color, and setting the square roots of the eigen values of the respective principal components as tolerance, a preferable skin-color range as shown in FIG. 3 is set.

[0081] A memory color and preferable color information therefor that are set as described above are prestored in the storage part 109. When the listed objects of memory colors in pages 7-18 of “Study of Phenomenal Characteristics of Memory Colors (First Report)” by Kazuyuki Natori and Gentaro Omi, Color Study, the Color Science Association of Japan, 2000, are employed as memory colors, for instance, the same processing is applicable.

[0082] Further, chromaticity is not limited to that of the Lab color space. The chromaticity of the YCC color space, xy chromaticity, and chromaticity using an RGB ratio are also employable.

[0083] The specific color subjected to correction in the color correction unit 100 may be specified by a user as follows.

[0084] First, a selection button for color specification is selected from a menu displayed on the screen of an image display unit (not graphically represented). Next, a message asking which memory color to employ as a specific color is successively displayed on the screen with four selection buttons of Memory Color 1, Memory Color 2, User Specification 1, and User Specification 2 being displayed below the message. The user can select one of the four selection buttons.

[0085] By selecting a desired memory color from the four selection buttons, the memory color corresponding to the selected button is read out from the storage part 109 as the specific color.

[0086] Predetermined memory colors such as a human skin color and the color of sky may be correlated with Memory Color 1 and Memory Color 2, respectively, and memory colors previously specified by the user may be correlated with User Specification 1 and User Specification 2. For instance, the color of water and the color of grass and trees may be correlated with User Specification 1 and User Specification 2, respectively. Thus, the user can set specific colors in memory colors based on the original image data.

[0087] In the following description, the specific color selected by the user is the memory color of a human skin color. However, the present invention is also applicable in the case of other memory colors. Further, the area formed of the specific color in the original image data is referred to as a specific color area. When the memory color of a human skin color is selected as the specific color, the specific color area is also referred to as a skin-colored area.

[0088] The image data output part 30 outputs the image data subjected to color correction in the color correction unit 100 to a printer, a multi-function apparatus, a facsimile machine, or a storage device such as a hard disk unit or an optical recording medium recorder. The image data output part 30 may output the corrected image data to outside via a network.

[0089] Next, an expatiation is given of each of the components of the color correction unit 100.

[0090] Characteristic Value Calculation Part 103:

[0091] The characteristic value calculation part 103 calculates the characteristic values of the image data supplied from the image data input part 10, and outputs a characteristic value table.

[0092] First, the R, G, and B data (R, G, B) of each pixel of the original image data input from the image data input part 10 is converted into chromaticity coordinates (L*, a*, b*) in the CIELAB uniform color space by: $\begin{matrix} {\begin{bmatrix} L^{*} \\ a^{*} \\ b^{*} \end{bmatrix} = {\begin{bmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{bmatrix}\quad\begin{bmatrix} R \\ G \\ B \end{bmatrix}}} & (5) \end{matrix}$

[0093] where a₁₁ through a₃₃ are conversion factors formed of constants.

[0094] Next, a description is given of a method of calculating the characteristic values of the original image data from the obtained chromaticity coordinates.

[0095] The original image data is split into areas (regions) in accordance with its image characteristics, and the characteristic values are calculated area by area. As the method of splitting the original image data into areas, a variety of methods is applicable, such as a method of splitting image data into areas recursively from the statistical information of the image data (“Structured Description of Color-Image Data Region Splitting” by Yu-ichi Ota, Takeo Kanade, and Toshiyuki Sakai, Information Processing, Information Processing Society of Japan, December 1978, Vol. 19, No. 12, pp. 1130-1136) or a splitting method using the statistical information of an image (“Picture Segmentation Using A Recursive Segmentation Splitting Method” by Ron Ohlander et al., Comp. Graph. and Image Proc., pp. 313-333).

[0096] In this embodiment, a splitting method to which the K-means algorithm is applied is employed. For instance, image data as shown in FIG. 4A is split into areas so that an image as shown in FIG. 4B is obtained. The image of FIG. 4B is subjected to contrast correction to be represented by shading information so as to make it easy to understand the results of the area splitting.

[0097] The details of this splitting method are described in the above-mentioned documents. The outline is as follows.

[0098] First, the entire screen of the original image data is split into preset sub-areas (regions) so that initial areas are generated. Then, a statistical information table is calculated (created) for each initial area. In this embodiment, the original image data is split into 25 (vertically five times horizontally five) areas (5×5=25). However, only five of the 25 sub-areas are shown in FIG. 4B for convenience of description.

[0099] At this point, each statistical information table is composed of the arithmetic average (L*_(ave), a*_(ave), b*_(ave)) of the color information Lab values (L*, a*, b*) of the corresponding initial area and the arithmetic average (I_(ave), J_(ave)) of the position information (i, j) of the corresponding initial area. The arithmetic average (L*_(ave), a*_(ave), b*_(ave)) and the arithmetic average (I_(ave), J_(ave)) are calculated from: $\begin{matrix} \begin{matrix} {{L_{ave}^{*} = \frac{\sum\limits_{t = 1}^{v}\quad {\sum\limits_{u = 1}^{w}\quad L_{tu}^{*}}}{v \times w}},{a_{ave}^{*} = \frac{\sum\limits_{t = 1}^{v}\quad {\sum\limits_{u = 1}^{w}\quad a_{tu}^{*}}}{v \times w}},{b_{ave}^{*} = \frac{\sum\limits_{t = 1}^{v}\quad {\sum\limits_{u = 1}^{w}\quad b_{tu}^{*}}}{v \times w}}} \\ {{I_{ave} = \frac{\sum\limits_{t = 1}^{v}\quad {\sum\limits_{u = 1}^{w}\quad I_{tu}}}{v \times w}},{J_{ave} = \frac{\sum\limits_{t = 1}^{v}\quad {\sum\limits_{u = 1}^{w}\quad J_{tu}}}{v \times w}}} \end{matrix} & (6) \end{matrix}$

[0100] where v and w are the number of vertical and horizontal pixels [pix] of the initial area, respectively, L*_(tu), a*_(tu), and b*_(tu) are Lab values at a pixel position [t, u], and I_(tu), and J_(tu) are position information at a pixel position [t, u].

[0101] Next, the relative distance D(h) between the chromaticity coordinate values (L*, a*, b*) and the position information (i, j) of the image data and each statistical information table is calculated by a sub-area search using Equation (7) so as to determine in which of the 25 sub-areas the relative distance D(h) is minimized. $\begin{matrix} {{D({No})} = \sqrt{\begin{matrix} {{Q_{1}\left\{ {\left( {L^{*} - L_{ave}^{*}} \right)^{2} + \left( {a^{*} - a_{ave}^{*}} \right)^{2} + \left( {b^{*} - b_{ave}^{*}} \right)^{2}} \right\}} +} \\ {Q_{2}\left\{ {\left( {i - I_{ave}} \right)^{2} + \left( {j - J_{ave}} \right)^{2}} \right\}} \end{matrix}}} & (7) \end{matrix}$

[0102] where Q₁ and Q₂ are constants, which are 1 (Q₁=Q₂=1) in this embodiment.

[0103] This sub-area search is repeated as many times as the number of sub-areas (25 times in this embodiment) to search for the number h of the sub-area that minimizes D(h). This h represents sequential serial numbers for the sub-areas, and corresponds to the subscript h of H_(h) in the table of FIG. 5.

[0104] The contents of the statistical information table of the searched-out sub-area and the number of the sub-area to which the pixel (i, j) originally belongs are rewritten, thereby rewriting the statistical information tables of the sub-area to which the pixel (i, j) originally belongs and the searched-out sub-area. This operation is repeated as many times as the number of pixels of the image data. In this embodiment, this operation is repeated (i+1)×(j+1) times.

[0105] After repeating the above-described processing a predetermined number of times, the image data split into areas as shown in FIG. 4B is obtained.

[0106] Finally, the characteristic value table of the original image data is created based on the information on the sub-areas obtained in their respective statistic information tables, employing the central value (L*_(ave), a*_(ave), b*_(ave)) of the chromaticity coordinates of the original image data and the percentage ΔS [%] of an area occupied by a sub-area in the area of the original image data of each sub-area as the characteristic values of the original image data.

[0107] In this embodiment, the average (L*_(ave), a*_(ave), b*_(ave)) is employed as characteristic values of the original image data (image data before correction). However, a variety of statistics similar to the average, such as a standard deviation, a median, and a mode, are also employable.

[0108] As a result of the above-described processing, the characteristic value table is obtained from the original image data as shown in FIG. 5.

[0109] Area Extraction Part 105:

[0110] The area extraction part 105 extracts the specific color area (skin-colored area) and its peripheral background area of the original image data supplied from the image data input part 10 from the calculated characteristic value table and the color information of a memory color prestored in the storage part 109.

[0111] In order to perform the extraction, the R, G, and B original image data (R, G, B) is subjected to the conversion of Equation (5) sub-area by sub-area as in the characteristic value calculation part 103 so as to be mapped into the CIELAB uniform color space.

[0112] A plurality of points onto which the original image data is mapped are defined as H_(h) (L*(H_(h)), a*(H_(h)), b*(H_(h)). , where h is the number of sub-areas (h=1, . . . ). Of the points, those belonging to a range in the chromaticity coordinates of the specific color (skin color) which range is preset in the storage part 109 are determined to be the specific color area (skin-colored area).

[0113] Next, a description is given, with reference to FIG. 6, of a method of extracting the specific color area (skin-colored area).

[0114]FIG. 6 is a diagram showing the results of the mapping of chromaticity coordinates in each split area (sub-area) of the original image data of FIGS. 4A and 4B into the CIELAB uniform color space. A range denoted as a “specific color range” in FIG. 6 indicates the range of the chromaticity coordinates of the specific color (skin color) stored in the storage part 109. The points of the original image data mapped within this range correspond to the specific color.

[0115] Points H_(h) in FIG. 6 correspond to the numbers h of the sub-areas of the original image data. Points H₄ and H₅ are the chromaticity coordinates of the image data to be extracted as the specific color area (skin-colored area).

[0116] The specific color area (skin-colored area) extracted at this point includes the two points H₄ and H₅. In this case, a point (or an area) having the higher (highest) percentage ΔS [%] is determined to be the specific color area (skin-colored area). Accordingly, Point H₄ is determined as the specific color area (skin-colored area).

[0117] The area having the highest percentage ΔS [%] is determined based on the percentages ΔS [%] of the split areas (sub-areas) entered in the previously created characteristic value table.

[0118] Likewise, of the three areas H₁, H₂, and H₃ other than the specific color area (skin-colored area), the area H₁ having the highest percentage Δs [%] is selected as the background area of the specific color area.

[0119] Further, in the case of extracting the specific color area and its background area, if the specific color area or the background area is smaller than a predetermined area size, it may be determined that the specific color area or the background area is not to be employed for correction. As a result, an appropriate area may be extracted. A percentage ΔS for the predetermined area size is suitably less than or equal to 5 to 10%.

[0120] Target Value Calculation Part 107:

[0121] The target value calculation part 107 calculates the target value of a preferable color which serves as a target of correction for the specific color area (skin-colored area) of the original image data. A description is given, with reference to FIG. 7, of a method of calculating the target value. Referring to FIG. 7, R indicates the chromaticity coordinates of the center of a preferable specific color area (preferable skin-colored area), and S indicates the characteristic values of the specific color area (skin-colored area) of the original image data. The above-described Point H₄ corresponds to Point S. The chromaticity coordinates R′ of the specific color (skin color) that serve as the target value are calculated from Point Q of the background area (corresponding to the above-described Point H₁) and Point R.

[0122] In the following, the target value is calculated by solving the equations of straight lines connecting the points on chromaticity coordinates using two-dimensional space coordinates. However, the method of calculating the target value is not limited to this method. For instance, three-dimensional principal components are applicable as below-described three-dimensional components. Further, it is possible to calculate the equation of a straight line using vector components.

[0123] First, letting the coordinates of Point O (origin) and Point Q (background) be O(a*(o), b*(o) and Q(a*(q), b*(q)), respectively, a straight line l that has the same slope as a segment passing through Points O and Q and passes through Point R (preferable) is expressed by: $\begin{matrix} {{l\text{:}\quad b^{*}} = {{\frac{{b^{*}(q)} - {b^{*}(o)}}{{a^{*}(q)} - {a^{*}(o)}} \cdot \left\{ {a^{*} - {a^{*}(r)}} \right\}} + {b^{*}(r)}}} & (8) \end{matrix}$

[0124] At this point, the coordinates of Point R are R(a*(r), b*(r)), and the intersection of the straight line l and an ellipsoid E formed of the first and second principal components of the preferable specific color area (preferable skin-colored area) is calculated as R′ (target). The obtained coordinates are defined as R′(a*(r′), b*(r′)). The ellipsoid E is defined by: $\begin{matrix} {{{E\text{:}\quad \left( \frac{P_{1}}{\sqrt{\lambda_{1}}} \right)^{2}} + \left( \frac{P_{2}}{\sqrt{\lambda_{2}}} \right)^{2}} = 1} & (9) \\ {\begin{bmatrix} P_{1} \\ P_{2} \end{bmatrix} = {\begin{bmatrix} p_{11} & p_{12} \\ p_{21} & p_{22} \end{bmatrix}\quad\begin{bmatrix} a^{*} \\ b^{*} \end{bmatrix}}} & (10) \end{matrix}$

[0125] where P₁ and P₂ are the first and second principal components, respectively, λ₁ and λ₂ are the eigen values of the first and second principal components, respectively, and p₁₁ through p₂₂ are constants.

[0126] A straight line m connecting Point S(a*(s), b*(s)) of the characteristic values of the original image data and the target value R′ is calculated from: $\begin{matrix} {{m\text{:}\quad b^{*}} = {{\frac{{b^{*}\left( r^{\prime} \right)} - {b^{*}(s)}}{{a^{*}\left( r^{\prime} \right)} - {a^{*}(s)}} \cdot \left( {a^{*} - {a^{*}(s)}} \right\}} + {b^{*}(s)}}} & (11) \end{matrix}$

[0127] and the control point S′ (target) of the image data is set at a predetermined point on the straight line m.

[0128] At this point, a correction Th from Point S to Point S′ is calculated from the characteristic values of the image, which is described below with reference to the image data correction part 111.

[0129] Image Data Correction Part 111:

[0130] The image data correction part 111 calculates the correction Th in accordance with the target value of the preferable color for the specific color calculated in the target value calculation part 107 and the characteristic values obtained from the characteristic value table of the original image data. Then, the image data correction part 111 obtains the corrected image data by performing color correction on the original image data by the correction Th.

[0131] A correction according to the percentage Δs [%] of the specific color area (skin-colored area) in the original image data is stored in a memory such as an LUT (look-up table) as the correction Th.

[0132] Alternatively, a function such as Equation (12) may be defined so as to suitably calculate the correction Th using the percentage Δs obtained from the characteristic value table. $\begin{matrix} {{Th} = \left\{ \begin{matrix} {{a\left( {1 - r} \right)} \cdot \left( {\Delta \quad S_{s}} \right)^{r}} & {{\ldots \quad 0} \leq {\Delta \quad S_{s}} \leq a} \\ {1 - {\left( {1 - a} \right)^{1 - r} \cdot \left( {1 - {\Delta \quad S_{s}}} \right)^{r}}} & {{\ldots \quad a} \leq {\Delta \quad S_{s}} \leq 1} \end{matrix} \right.} & (12) \end{matrix}$

[0133] where ΔS_(s) is the percentage ΔS of the specific color (skin color), and a and r are constants of 0 to 1.

[0134] Next, a description is given, with reference to FIG. 7, of a method of performing correction on the entire image.

[0135] The original image data is converted from the Lab values to the values P₁ and P₂ by Equation (10).

[0136] Then, a point S_(i) of the original image data is corrected to a point S_(i)′ in accordance with the distance from the background area. A correction δTh for this correction is expressed by Equation (13), letting the distance between Point Q of the background area and Point S of the image be |QS| and the distance between Point S and Point S′ be Th. $\begin{matrix} {{{\delta \quad {Th}} = \sqrt{\left( {P_{1}\delta \quad {Th}} \right)^{2} + \left( {P_{2}\delta \quad {Th}} \right)^{2}}}{{P_{1}\delta \quad {Th}} = {{{Th} \cdot \cos}\quad {\theta_{1} \cdot \frac{\overset{\_}{{OS}_{i}}}{\overset{\_}{QS}}}}}{{P_{2}\delta \quad {Th}} = {{{Th} \cdot \cos}\quad {\theta_{2} \cdot \frac{\overset{\_}{{OS}_{i}}}{\overset{\_}{QS}}}}}} & (13) \end{matrix}$

[0137] where θ₁ and θ₂ are angles that the first and second principal components, respectively, form with respect to the straight line m, and |{overscore (QS)}| is the distance between Points Q and S.

[0138] A description is given, with reference to FIG. 8, of the detailed movement of this correction. FIG. 8 shows positions of color correction before and after the correction. As described above, Point S (image) close to the specific color area (skin-colored area) is corrected to Point S′ (target). In the drawing, an arrow indicates the magnitude (amount) of correction. Likewise, a point S₁ is moved by a correction Th₁ (composed of P₁δTh₁ and P₂δTh₁) and corrected to a point S₁′. Further, a point S₂, which is close to the background area, is moved by a correction Th₂ (composed of P₁δTh₂ and P₂δTh₂) and corrected to a point S₂′.

[0139] The comparison of these corrections show that as a point moves away from the specific color area (skin-colored area) and comes closer to the background area as S→S₁→S₂, a correction for the point decreases as |Th|>|Th₁|>|Th₂|.

[0140] By this correction, the specific color area (skin-colored area) of the image is corrected to a preferable color while the color of the background area is scarcely corrected. Accordingly, only the specific color (skin color) may be suitably corrected without losing the balance of the entire image.

[0141] Finally, P1 and P2 are inversely converted into Lab values, and are further inversely converted into R, G, and B values by: $\begin{matrix} {\begin{bmatrix} a^{*} \\ b^{*} \end{bmatrix} = {{{\begin{bmatrix} p_{11} & p_{12} \\ p_{21} & p_{22} \end{bmatrix}^{- 1}\begin{bmatrix} P_{1} \\ P_{2} \end{bmatrix}}\begin{bmatrix} R \\ G \\ B \end{bmatrix}} = {\begin{bmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{bmatrix}^{- 1}\begin{bmatrix} L^{*} \\ a^{*} \\ b^{*} \end{bmatrix}}}} & (14) \end{matrix}$

[0142] As a result, the corrected image data is obtained, and is supplied to the image data output part 30.

[0143] According to this embodiment, a linear primary expression that inversely converts Lab values into R, G, and B values is employed. However, it is also possible to store this in an LUT and coverts Lab values into R, G, and B values by an interpolation operation. Alternatively, an LUT that converts Lab values into density is also employable.

[0144] The same processing as described above is performable in the case of correcting another memory color. In this case, the a-b plane may be split into appropriate hues (areas), and the correction of the memory color may be controlled in each area to which the memory color belongs.

[0145] [Second Embodiment]

[0146] According to a second embodiment, a correction obtained in the same way as in the first embodiment is subjected to image processing so that a preferable color is always obtained in accordance with the attribute information of the original image data obtained from outside.

[0147]FIG. 9 is a block diagram showing a functional configuration of the image processing apparatus according to the second embodiment of the present invention. Referring to FIG. 9, image data is input from the image data input part 10, subjected to color correction in the color correction unit 100, and output from the image data output part 30.

[0148] The color correction unit 100 includes the unit controller 101, the characteristic value calculation part 103, the area extraction part 105, the target value calculation part 107, the storage part 109, an attribute information obtaining part 112, and the image data correction part 111.

[0149] The unit controller 101 controls the entire color correction unit 100. The characteristic value calculation part 103 calculates the characteristic values of the image data input from the image input part 10, which is hereinafter also referred to as the original image data, and outputs the characteristic value table of the original image data. The area extraction part 105 extracts a specific color area to be subjected to color correction and its background area included in the original image data, referring to the color information of a memory color stored in the storage part 109. The target value calculation part 107 calculates the target value of a preferable color after color correction for the specific color from the color information of the extracted specific color area and background area and preferable color information for the specific color obtained from the storage part 109. The attribute information obtaining part 112 obtains the attribute information of the original image data. The image data correction part 111 calculates a correction (amount) in accordance with the calculated target value of the preferable memory color and characteristic values obtained from the characteristic value table and the attribute information of the original image data. Then, the image data correction part 111 obtains image data by performing color correction on the original image data by the calculated amount. The obtained image data is hereinafter also referred to as corrected image data.

[0150] In FIG. 9, the elements having the same functions as in the first embodiment (FIG. 2) are referred to by the same numerals, and with respect to those elements, only a difference from the first embodiment is described.

[0151] The attribute information obtaining part 112 reads out information added to the original image data supplied from the image data input part 10, and supplies the read-out information to the image data correction part 111. Any file structure such as the Exif or DPOF format structure is employable as the data format of the read-out information.

[0152] For instance, the attribute information obtaining part 112 obtains the attribute information of the original image data, which is formed of a file structure based on the Exif format as shown in FIG. 10. Referring to FIG. 10, in the case of obtaining image attribute information on the shot scene type of the information on picture-taking conditions of the original image data, each integer value of the type (unsigned integer value) of the scene capture type in 41990 of the tag number (HEX: hexadecimal) of the image is read. For instance, if the type of the scene capture type is 0, it is shown that the taking of a picture has been performed under standard picture-taking conditions. If the type of the scene capture type is 2, it is shown that a portrait (human image) has been captured.

[0153] When the image attribute information attached to the original image data has been read, the image data correction part 111 obtains a correction factor α_(scene) according to the image attribute information from a correction factor table (LUT). Then, the image data correction part 111 multiplies a correction calculated in the same manner as in the first embodiment by the correction factor α_(scene), and corrects the original image data using the multiplied correction as the final correction.

[0154] When the image attribute information is the scene capture type, the correction factor table has a data structure such that the types of the scene capture type are correlated with their respective correction factors α_(scene) as shown in FIG. 11.

[0155] For instance, when a portrait is captured (this case corresponds to Type 2 of FIG. 11), the correction factor α_(scene) is 1.30. This value is higher than that for STANDARD (corresponding to Type 0 of FIG. 11). This is because when a portrait is captured, a correction is increased since emphasis is put on the reproducibility of a skin-colored area in the image data.

[0156] A method of calculating the correction is not limited to the above-described method that refers to the correction factor table. For instance, the correction factor α_(scene) may be suitably calculated by: $\begin{matrix} {\alpha = \left\{ \begin{matrix} {\alpha_{scene} \cdot \left\{ {\left( {1 - r} \right) \cdot \left( {\Delta \quad S_{skin}} \right)^{r}} \right\}} & {{\ldots \quad 0} \leq {\Delta \quad S_{skin}} \leq a} \\ {\alpha_{scene} \cdot \left\{ {1 - {\left( {1 - a} \right)^{1 - r} \cdot \left( {1 - {\Delta \quad S_{skin}}} \right)^{r}}} \right\}} & {{\ldots \quad a} \leq {\Delta \quad S_{skin}} \leq 1} \end{matrix} \right.} & (15) \end{matrix}$

[0157] where ΔS_(skin) is the percentage ΔS of the specific color (skin color), and a and r are constants of 0 to 1.

[0158] Further, the image attribute information is not limited to the scene capture type. Correction may be performed based on other image attribute information. For instance, in the above-described correction factor table or Equation (15), the correction factor α_(scene) may be set so that α_(scene)=1 when a flash is used and detected and α_(scene)≈0 in the other cases. As a result, correction to set off a man in a night scene mode may be controlled.

[0159] Further, the image data of the skin-colored area may be reproduced more preferably by increasing the correction factor α_(scene) if, of the image attribute information, the F number is great or the shutter speed is low.

[0160] Further, it is also possible to perform correction in accordance with the magnitude of white balance correction. The R, G, and B values of the skin-colored area have their respective averages compared with those of the entire image. The differences are set in an LUT so that correction is performed based on the set differences.

[0161] That is, even when the image of a man is captured with considerably poor white balance, the skin color of the man is set within a preferable range. Accordingly, the image data of the skin-colored area can be reproduced more preferably.

[0162] According to the configuration of the second embodiment, a specific one of memory colors (the specific color or the human skin color) desired by a user may be corrected in accordance with its peripheral area so that a preferable color is always obtained.

[0163] Next, a description is given, with reference to FIG. 12, of a procedure for correcting the original image data in the image processing apparatus according to the first and second embodiments.

[0164] First, in step S10 of FIG. 12, image data is input from outside via a network or from an apparatus such as a hardware disk drive, a flexible disk drive, an optical recording medium reader, a scanner, or a digital camera. When the input image data is an analog signal, the image data is converted into a digital signal. Thereafter, the image data is subjected to predetermined digital processing, and is output as digital signals of R (red), G (green), and B (blue).

[0165] Next, in step S11, the R, G, and B data (R, G, B) of each input pixel is converted into chromaticity coordinates (L*, a*, b*) in the CIELAB uniform color space by Equation (5). Using the obtained chromaticity coordinates, the original image data is split into sub-areas recursively from its statistical information. Then, the central value (L*_(ave), a*_(ave), b*_(ave)) of the chromaticity coordinates of the original image data and the percentage ΔS [%] of an area occupied by a sub-area in the area of the original image data are calculated as characteristic values for each sub-area, and are stored in the characteristic value table.

[0166] In step S12, the original image data (R, G, B) is subjected to the conversion of Equation (5) sub-area by sub-area to be mapped into the CIELAB uniform color space. Of the mapped points H_(h), those belonging to a range in the chromaticity coordinates of the specific color (skin color) which range is stored in the storage part 109 are determined to be the specific color area (skin-colored area). The background area of the specific color area is selected from the rest of the mapped points.

[0167] If the percentage ΔS [%] of a sub-area entered in the characteristic value table is smaller than a predetermined area size (a percentage ΔS [%] less than or equal to 5 to 10%), the sub-area is not to be selected as the specific color area (skin-colored area) or the background area.

[0168] Then, in step S13, the target value of a preferable color serving as a target of correction for the specific color area (skin-colored area) of the original image data is calculated.

[0169] Referring to FIG. 7, first, the straight line 1 that has the same slope as the segment passing through Points O (origin) and Q (background) and passes through Point R (preferable) is obtained (Equation (8)), and the intersection of the straight line 1 and the ellipsoid E (Equations (9) and (10)) formed of the first and second principal components of the preferable specific color area (preferable skin-colored area) is calculated as R′ (target).

[0170] Next, the straight line m connecting Point S of the characteristic values of the original image data and the target value R′ is calculated from Equation (11), and the control point S′ (target) of the image data is set at a predetermined point on the straight line m.

[0171] The correction Th from Point S to Point S′ is calculated in accordance with the percentage ΔS of the specific color area (skin-colored area) using an LUT or a function such as Equation (12).

[0172] In step S14, a correction by which the original image data is corrected is calculated based on the calculated target value of the preferable color and the characteristic values for the specific color area (skin-colored area) obtained from the characteristic value table. The original image data is subjected to color correction by the calculated correction. Thus, the corrected image data is obtained.

[0173] Referring to FIG. 7, the original image data is converted from the Lab values to the values P₁ and P₂ by Equation (10). Then, letting the distance between Point Q of the background area and Point S of the image be |QS| and a correction at Point S be Th, the correction δTh for Point S_(i) of the original image data is calculated from Equation (13). Point S is corrected to Point S_(i)′ using the correction δTh.

[0174] If the image attribute information added to the original image data has been obtained at this point, the correction factor α_(scene) according to the image attribute information is obtained from the correction factor table or calculated from Equation (15). The correction Th and the correction δTh are multiplied by the correction factor α_(scene) to be determined as the final corrections.

[0175] Finally, using Equation (14), the values P₁ and P₂ are inversely converted into Lab values, and are further inversely converted into R, G, and B values. Thus, the (inversely converted) corrected image data is obtained.

[0176] In step S15, the corrected image data obtained by performing color correction on the original image data is output to a printer, a multi-function apparatus, a facsimile machine, or a storage device such as a hard disk unit or an optical recording medium recorder. Alternatively, the corrected image data may be output to outside via a network.

[0177] [Third Embodiment]

[0178] Next, a description is given of a third embodiment of the present invention. FIG. 13 is a block diagram showing a configuration of the image processing apparatus according to the third embodiment of the present invention. Referring to FIG. 13, image data is input from the image data input part 10, subjected to color correction in a color correction unit 200, and output from the image data output part 30.

[0179] The color correction unit 200 includes a unit controller 201, an area extraction part 203, a characteristic value calculation part 205, a target value calculation part 207, a storage part 209, and an image data correction part 211.

[0180] The unit controller 201 controls the entire color correction unit 200. The area extraction part 203 extracts a specific color area to be subjected to color correction and its background area included in the image data input from the image input part 10, which is hereinafter also referred to as the original image data, referring to the range of a memory color stored in the storage part 209. The characteristic value calculation part 205 calculates the characteristic values of the extracted specific color area and background area. The target value calculation part 207 calculates the target value of the specific color area in accordance with the characteristic values obtained from the characteristic value calculation part 205 based on the characteristic values and the range of the memory color obtained from the storage part 209. The image data correction part 211 performs color correction on the specific color area extracted in the area extraction part 203 based on the calculated target value.

[0181] The image data input part 10 and the image data output part 30 have the same functions as in the first and second embodiment, and a description thereof is omitted.

[0182] The storage part 209 stores the chromaticity information of memory colors and the color information of a preferable color (preferable color information) for each memory color. The chromaticity information is stored as extraction conditions for extracting a specified memory color from the original image data. The memory colors are colors memorized by a man, such as the colors of skin, sky, ocean, river, grass and trees, and snow. In the below-described case, the range of chromaticity coordinates for extracting a memory color and the range of chromaticity coordinates of a preferable memory color are preset as the extraction conditions for extracting the memory color. Alternatively, it is also possible to preset only specific ranges of chromaticity coordinates.

[0183] Further, chromaticity is not limited to the below-described chromaticity according to the YCC color space. Xy chromaticity, and chromaticity using an RGB ratio are also employable.

[0184] The specific color subjected to correction may be specified by a user as described in the first embodiment. In the following description, the specific color is the memory color of a human skin color. However, the present invention is also applicable in the case of other memory colors.

[0185] Area Extraction Part 203:

[0186] First, the R, G, and B data (R, B, G) of each pixel input from the image data input part 10 is converted into YCC data (YY, C₁, C₂) by: $\begin{matrix} {\begin{bmatrix} {YY} \\ C_{1} \\ C_{2} \end{bmatrix} = {\begin{bmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{bmatrix}\quad\begin{bmatrix} R \\ B \\ G \end{bmatrix}}} & (16) \end{matrix}$

[0187] where a₁₁ through a₃₃ are, for instance, constants as follows: $\begin{bmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{bmatrix} = \begin{bmatrix} 0.2989 & 0.5866 & 0.1145 \\ {- 0.1687} & {- 0.3312} & 0.5000 \\ 0.5000 & {- 0.4183} & {- 0.0816} \end{bmatrix}$

[0188] Further, chroma (C) and hue angle (H) are calculated from the obtained C₁ and C₂ by:

C={square root}{square root over (C₁ ²+C₂ ²)}

H=tan⁻¹(C₁/C₂)  (17)

[0189] Next, a description is given, with reference to FIG. 14, of a method of extracting the specific color area (skin-colored area) existing in the image data from the obtained chromaticity information. FIG. 14 shows YCC color space coordinates in the C₁-C₂ plane. The distance and the angle from Point O in the space represent chroma (C) and hue angle (H), respectively. The data of each pixel of the original image data is converted from chromaticity coordinate values of the RGB color space into chromaticity coordinate values of the YCC color space by Equation (16).

[0190] Next, the converted image data is compared with the range of the skin color (specific color) prestored in the storage part 209. The range of the skin-colored area may be specified by a user. That is, as shown in FIG. 15A, the center C_(ij) of the image data is specified, and the quantities r_(i) and r_(j) along the vertical and horizontal axes, respectively, of an ellipsoid centered on Point C_(ij) are specified. As a result, a substantial range of the skin-colored area can be determined.

[0191] The background area is defined as an area formed around the skin-colored area in an ellipsoid obtained by increasing the range (dimensions) of the skin-colored area by several times of the length of the short-axis.

[0192] The range of the skin-colored area and the background area obtained by the above-described processing are shown as an S area and an R area, respectively, in FIG. 15B.

[0193] Characteristic Value Calculation Part 205:

[0194] The characteristic value calculation part 205 calculates the characteristic values of the skin-colored area and the background area extracted from the original image data. The characteristic values are calculated by the following two methods, for instance.

[0195] (a) A frequency distribution is calculated with respect to the mapped points of each of the YY, C₁, and C₂ planes into which each pixel point belonging to the skin-colored area of the original image data is mapped by YCC conversion. FIG. 16 is a schematic graph of the frequency distribution of the luminance YY plane. The horizontal axis represents luminance YY, and the vertical axis represents the frequency f (%) of luminance.

[0196] Then, a standard deviation (α. Syy) in the luminance of the skin-colored area is calculated from a luminance (value) YY_(j) at a luminance point j and the average of the luminance values (a luminance average). Likewise, a standard deviation in each of the C₁ and C₂ planes is calculated. The standard deviations are calculated by: $\begin{matrix} {{{\sigma \cdot {Syy}} = \sqrt{\sum\limits_{j = 1}^{n}\quad {\left( {\overset{\_}{YY} - {YY}_{j}} \right)^{2}/\left( {n - 1} \right)}}}{{\sigma \cdot {Sc1}} = \sqrt{\sum\limits_{j = 1}^{n}\quad {\left( {\overset{\_}{C_{1}} - C_{1j}} \right)^{2}/\left( {n - 1} \right)}}}{{\sigma \cdot {Sc2}} = \sqrt{\sum\limits_{j = 1}^{n}\quad {\left( {\overset{\_}{C_{2}} - C_{2j}} \right)^{2}/\left( {n - 1} \right)}}}} & (18) \end{matrix}$

[0197] where {overscore (YY)}, {overscore (C)}₁, , and {overscore (C)}₂ are averages in the YY, C₁, and C₂ planes, respectively, and n is a series of frequency distribution in each plane, and is a dynamic range that varies dynamically.

[0198] Likewise, standard deviations are calculated for the background area by: $\begin{matrix} {{{\sigma \cdot {Ryy}} = \sqrt{\sum\limits_{j = 1}^{n}\quad {\left( {\overset{\_}{YY} - {YY}_{j}} \right)^{2}/\left( {n - 1} \right)}}}{{\sigma \cdot {Rc1}} = \sqrt{\sum\limits_{j = 1}^{n}\quad {\left( {\overset{\_}{C_{1}} - C_{1j}} \right)^{2}/\left( {n - 1} \right)}}}{{\sigma \cdot {Rc2}} = \sqrt{\sum\limits_{j = 1}^{n}\quad {\left( {\overset{\_}{C_{2}} - C_{2j}} \right)^{2}/\left( {n - 1} \right)}}}} & (19) \end{matrix}$

[0199] where {overscore (YY)}, {overscore (C)}₁, and {overscore (C)}₂ are averages in the YY, C₁, and C₂ planes, respectively, and n is a series of frequency distribution in each plane, and is a dynamic range that varies dynamically.

[0200] The calculated standard deviations σ. Syy, σ. Sc1, σ. Sc2, σ. Ryy, σ. Rc1, and σ. Rc2 are determined as the characteristic values of the original image data.

[0201] According to this embodiment, the standard deviations of the original image data are employed as its characteristic values. However, a variety of statistics such as an average, a median, and a mode, are also employable.

[0202] (b) A frequency distribution is calculated with respect to the mapped points of each of the YY, C, and H planes into which each pixel point belonging to the skin-colored area of the original image data is mapped after being subjected to YCC conversion and further converted into chroma (C) and hue (H) by Equation (17). FIG. 17 is a schematic graph of the frequency distribution of the chroma (C) plane. The horizontal axis represents chroma (C), and the vertical axis represents the frequency f (%) of chroma (C).

[0203] Then, a standard deviation (ρ. Sc) in the chroma of the skin-colored area is calculated from a chroma (value) C_(j) at a chroma point j and the average of the chroma values (a chroma average). Likewise, a standard deviation in each of the hue H and luminance YY planes is calculated. The standard deviations are calculated by: $\begin{matrix} {{{\rho \cdot {Syy}} = \sqrt{\sum\limits_{j = 1}^{n}\quad {\left( {\overset{\_}{YY} - {YY}_{j}} \right)^{2}/\left( {n - 1} \right)}}}{{\rho \cdot {Sc}} = \sqrt{\sum\limits_{j = 1}^{n}\quad {\left( {\overset{\_}{C} - C_{j}} \right)^{2}/\left( {n - 1} \right)}}}{{\rho \cdot {Sh}} = \sqrt{\sum\limits_{j = 1}^{n}\quad {\left( {\overset{\_}{H} - H_{j}} \right)^{2}/\left( {n - 1} \right)}}}} & (20) \end{matrix}$

[0204] where {overscore (C)}, {overscore (H)}, and {overscore (YY)} are averages in the C, H, and YY planes, respectively, and n is a series of frequency distribution in each plane, and is a dynamic range that varies dynamically.

[0205] Likewise, standard deviations are calculated for the background area by: $\begin{matrix} {{{\rho \cdot {Ryy}} = \sqrt{\sum\limits_{j = 1}^{n}\quad {\left( {\overset{\_}{YY} - {YY}_{j}} \right)^{2}/\left( {n - 1} \right)}}}{{\rho \cdot {Rc}} = \sqrt{\sum\limits_{j = 1}^{n}\quad {\left( {\overset{\_}{C} - C_{j}} \right)^{2}/\left( {n - 1} \right)}}}{{\rho \cdot {Rh}} = \sqrt{\sum\limits_{j = 1}^{n}\quad {\left( {\overset{\_}{H} - H_{j}} \right)^{2}/\left( {n - 1} \right)}}}} & (21) \end{matrix}$

[0206] where {overscore (C)}, {overscore (H)}, and {overscore (YY)} are averages in the C, H, and YY planes, respectively, and n is a series of frequency distribution in each plane, and is a dynamic range that varies dynamically.

[0207] The calculated standard deviations ρ. Syy, ρ. Sc, ρ. Sh, ρ. Ryy, ρ. Rc, and ρ. Rh are determined as the characteristic values of the original image data.

[0208] According to this embodiment, the standard deviations of the original image data are employed as its characteristic values. However, a variety of statistics such as an average, a median, and a mode, are also employable.

[0209] Target Value Calculation Part 207:

[0210] The target value calculation part 207 calculates the chromaticity information of a target value indicating a color to which the color of the skin-colored area of the original image data is corrected.

[0211] First, the representative color of each area is obtained. Any point in the area is employable as the representative color of the area. According to this embodiment, principal component analysis is performed on each area, and the center of the obtained principal component axis is determined as the representative color of the area.

[0212] Each pixel point of the skin-colored area extracted from the original image data by the area extraction part 203 is subjected to YCC conversion. Principal component analysis is performed on the skin-colored area after the YCC conversion. The center of the obtained principal component axis (Point S in FIG. 14) is determined as the representative color of the skin-colored area.

[0213] Likewise, each pixel point of the background area extracted from the original image data by the area extraction part 203 is subjected to YCC conversion. Principal component analysis is performed on the background area after the YCC conversion. The center of the obtained principal component axis (Point R in FIG. 14) is determined as the representative color of the background area.

[0214] Further, the chromaticity point (Point P in FIG. 14) of a preferable color for the skin color is read from the storage part 209.

[0215] Next, the chromaticity point (Point Q) of the target value is calculated from Points R and P and the characteristic values of the skin-colored area and the background area obtained in the characteristic value calculation part 103.

[0216] For instance, the distance |PR| between Points P and R is calculated by:

|PR|={square root}{square root over ((C _(1P) −C _(1R))²+(C _(2P) −C _(2R))²)}  (22)

[0217] where C_(1P) and C_(2P) are the coordinate values of C₁ and C₂, respectively, at Point P, and C_(1R) and C_(2R) are the coordinate values of C₁ and C₂, respectively, at Point R.

[0218] Next, Point Q (distant from Point P by Th) on the segment PR connecting Points P and R is calculated as a target value for correcting the preferable skin color in accordance with the color of the background area.

[0219] Next, a description is given of a method of calculating a correction for each of the above-described methods (a) and (b) of calculating the characteristic values the skin-colored area and the background area according to the characteristic value calculation part 205.

[0220] A Method of Calculating a Correction (Th) Based on the Characteristic Values According to the Above-Described Method (a):

[0221] The relationship between corrections and the characteristic values of the skin-colored area and the background area is prestored in an LUT. A correction Th corresponding to the characteristic values of the skin-colored area (σ. Syy, σ. Sc1, and σ. Sc2) and the characteristic values of the background area (σ. Ryy, σ. Rc1, and σ. Rc2) calculated by the method (1) is calculated, referring to the LUT.

[0222] For instance, FIG. 18 shows an LUT showing the relationship between characteristic value (the standard deviation of luminance YY) and correction in a general background area. When a characteristic value σ. Ryy is given, the corresponding correction Th is calculated.

[0223] That is, when the luminance of the background area has a broad distribution as in the case of, for instance, a landscape image where a large quantity of luminance information is employed, the calculated correction Th is low. On the other hand, in the case of, for instance, a portrait of a single color background, the calculated correction Th is high.

[0224] That is because when the information of the background area is small in quantity, a correction is increased, and when the background area has a large quantity of information, a correction is reduced since emphasis is not put on the reproducibility of the skin color.

[0225] According to this embodiment, the luminance distribution of the background area is employed. However, this is only an example, and the luminance, C₁, and C₂ components of the background area, and the luminance, C₁, and C₂ components of the skin-colored area is employable individually or in an appropriate combination.

[0226] A Method of Calculating a Correction (Th) Based on the Characteristic Values According to the Above-Described Method (b):

[0227] The relationship between corrections and the characteristic values of the skin-colored area and the background area is prestored in an LUT. A correction Th corresponding to the characteristic values of the skin-colored area (ρ. Syy, ρ. Sc, and ρ. Sh) and the characteristic values of the background area (ρ. Ryy, ρ. Rc, and ρ. Rh) calculated by the method (1) is calculated, referring to the LUT.

[0228] For instance, FIG. 19 shows an LUT showing the relationship between characteristic value (the standard deviation of chroma C) and correction in a general skin-colored area. When a characteristic value ρ. Sc is given, the corresponding correction Th is calculated.

[0229] That is, when the percentage of the skin-colored area in the original image data is high, the calculated correction Th is high. In the opposite case, the calculated correction Th is low.

[0230] This is because when the skin-colored area is wide, emphasis is put on the reproducibility of the skin color, and when the skin-colored area is small, the influence of the reproducibility of the skin color over image quality is limited.

[0231] According to this embodiment, the chroma distribution of the skin-colored area is employed. However, this is only an example, and the luminance, chroma, and hue components of the skin-colored area and the luminance, chroma, and hue components of the background area is employable individually or in an appropriate combination.

[0232] The method of calculating the correction Th is not limited to a method that calculates the correction Th directly by previously calculating the correction of a preferable color for a characteristic value and storing the relationship in a memory such as an LUT. The correction Th may be calculated from a function expressing the relationship between the correction of a preferable color and a characteristic value. This makes it possible to realize a configuration that performs a variety of processing.

[0233] Image Data Correction Part 211:

[0234] The image data correction part 211 performs color correction by shifting the representative color (Point S) of the skin-colored area (S range) to the target value (Point Q) and shifting the other chromaticity points included in the skin-colored area in the same manner in the YCC color space (FIG. 14).

[0235] Referring to FIG. 14, with respect to each chromaticity point S_(i) in the skin-colored area (S range), a chromaticity point S_(i)′ to which the chromaticity point S_(i) is shifted by a distance |SQ| in the direction from Point S to Point Q is calculated. Then, the chromaticity points S_(i) and S_(i)′ are inversely converted from YCC color space values into RGB color space values by Equation (16). The pixel data of the original image data which pixel data has the same value as the RGB value into which the chromaticity point S_(i) is inversely converted is replaced by the RGB value into which the chromaticity point S_(i)′ is inversely converted. This processing is performed on every chromaticity point S_(i) included in the skin-colored area (S range), thereby correcting the skin color of the original image data.

[0236] In the above-described case, the pixels in the skin-colored area are simply shifted uniformly by the distance |SQ|. Alternatively, the pixels may be moved based on a predetermined function that decreases a correction for a pixel in the specific color area as the position of the pixel comes closer to the background area.

[0237] According to the above-described configuration, a specific color (for instance, a human skin color) may be corrected in accordance with its peripheral area so that a preferable color is always obtained.

[0238] [Fourth Embodiment]

[0239] A description is given of a fourth embodiment of the present invention.

[0240] In the fourth embodiment, the color correction unit 200 of the third embodiment obtains a preferable color by reading the attribute information of an image.

[0241]FIG. 20 is a block diagram showing a configuration of the image processing apparatus according to the fourth embodiment of the present invention. Referring to FIG. 20, image data is input from the image data input part 10, subjected to color correction in the color correction unit 200, and output from the image data output part 30.

[0242] The color correction unit 200 includes the unit controller 201, the area extraction part 203, the characteristic value calculation part 205, the attribute information obtaining part 112, the target value calculation part 207, the storage part 209, and the image data correction part 211.

[0243] The unit controller 201 controls the entire color correction unit 200. The area extraction part 203 extracts a specific color area to be subjected to color correction and its background area included in the image data input from the image input part 10, which is hereinafter also referred to as the original image data, referring to the range of a memory color stored in the storage part 209. The characteristic value calculation part 205 calculates the characteristic values of the extracted specific color area and background area. The attribute information obtaining part 112 obtains the attribute information of the original image data. The target value calculation part 207 calculates the target value of the specific color area in accordance with the characteristic values obtained from the characteristic value calculation part 205 based on the characteristic values, the range of the memory color obtained from the storage part 209, and the attribute information of the original image data obtained from the attribute information obtaining part 112. The image data correction part 211 performs color correction on the specific color area extracted in the area extraction part 203 based on the calculated target value.

[0244] In FIG. 20, the elements having the same functions as in the third embodiment (FIG. 13) are referred to by the same numerals, and with respect to those elements, only a difference from the third embodiment is described.

[0245] Target Value Calculation Part 207:

[0246] A description is given, with reference to FIG. 21, of a method of calculating a correction (Th). FIG. 21 is a correction factor table showing a correction factor for the correction (Th) of the skin-colored area with respect to a given scene capture type value. Image data correction is performed using a value obtained by multiplying the correction Th obtained by the target value calculation part 207 of the third embodiment by the correction factor.

[0247] That is, when a portrait is captured (this case corresponds to Type 2 of FIG. 21), the correction factor is calculated to be 0.5. That is, in this case, the correction factor is calculated to be a value higher than that for STANDARD (corresponding to Type 0 of FIG. 21). This is because when a portrait is captured, a correction is increased since emphasis is put on the reproducibility of a skin-colored area in the image data.

[0248] A method of calculating the correction factor is not limited to the above-described method that refers to the correction factor table. The correction factor may also be suitably calculated by a prepared function based on the image attribute information. Further, not only a luminance component but also a chroma or hue component is employable as the correction Th.

[0249] Next, a description is given, with reference to FIG. 22, of a procedure for correcting the original image data in the image processing apparatus according to the third and fourth embodiments.

[0250] First, in step S20 of FIG. 22, image data is input from outside via a network or from an apparatus such as a hardware disk drive, a flexible disk drive, an optical recording medium reader, a scanner, or a digital camera. When the input image data is an analog signal, the image data is converted into a digital signal. Thereafter, the image data is subjected to predetermined digital processing, and is output as digital signals of R (red), G (green), and B (blue).

[0251] Next, in step S21, the data of each pixel of the original image data is converted from chromaticity coordinate values of the RGB color space into chromaticity coordinate values of the YCC color space by Equation (16). The converted image data is compared with the range of the skin color (specific color) prestored in the storage part 209. Thereby, the specific color area (skin-colored area) existing in the original image data is extracted. An area formed around the skin-colored area in an ellipsoid obtained by increasing the range (dimensions) of the skin-colored area by several times of the length of the short-axis is defined as the background area of the specific color area.

[0252] Next, in step S22, the characteristic values of the extracted skin-colored area and background area are calculated. The characteristic values may be calculated by one of the following two methods:

[0253] (a) A frequency distribution is calculated with respect to the mapped points of each of the YY, C₁, and C₂ planes into which each pixel point belonging to the skin-colored area of the original image data is mapped by YCC conversion. The standard deviations in the planes of the skin-colored area are calculated by Equation (18) to be employed as the characteristic values of the skin-colored area. Likewise, the standard deviations in the planes of the background area are calculated by Equation (19) to be employed as the characteristic values of the background area.

[0254] (b) A frequency distribution is calculated with respect to the mapped points of each of the YY, C, and H planes into which each pixel point belonging to the skin-colored area of the original image data is mapped after being subjected to YCC conversion and further converted into chroma (C) and hue (H) by Equation (17). The standard deviations in the planes of the skin-colored area are calculated by Equation (20) to be employed as the characteristic values of the skin-colored area. Likewise, the standard deviations in the planes of the background area are calculated by Equation (21) to be employed as the characteristic values of the background area.

[0255] Next, in step S23, the chromaticity information of a target value indicating a color to which the color of the skin-colored area of the original image data is corrected is calculated.

[0256] First, principal component analysis is performed on each of the skin-colored area and the background area. The centers of the obtained principal component axes of the skin-colored area and the background area are obtained as their respective representative colors (Points S and R in FIG. 14).

[0257] Next, the chromaticity point (Point P in FIG. 14) of a preferable color for the specific color (skin color) is read out from the storage part 209. The chromaticity point (Point Q, distant from Point P by Th) of the target value is calculated from Points R and P and the characteristic values of the original image data.

[0258] If the image attribute information added to the original image data has been obtained at this point, a correction factor α according to the image attribute information is obtained from the correction factor table. The correction Th is multiplied by the correction factor α to be determined as the final correction.

[0259] Then, in step S24, color correction is performed by shifting the representative color (Point S) of the skin-colored area (S area) to the target value (Point Q) and shifting the other chromaticity points included in the skin-colored area in the same manner in the YCC color space.

[0260] With respect to each chromaticity point S_(i) in the skin-colored area (S range), a chromaticity point S_(i)′ to which the chromaticity point S_(i) is shifted by a distance |SQ| in the direction from Point S to Point Q is calculated. Then, the chromaticity points S_(i) and S_(i)′ are inversely converted from YCC color space values into RGB color space values by Equation (16). The pixel data of the original image data which pixel data has the same value as the RGB value into which the chromaticity point S_(i) is inversely converted is replaced by the RGB value into which the chromaticity point S_(i)′ is inversely converted. This processing is performed on every chromaticity point S_(i) included in the skin-colored area (S range), thereby correcting the skin color of the original image data.

[0261] In step S25, the corrected image data obtained by performing color correction on the original image data is output to a printer, a multi-function apparatus, a facsimile machine, or a storage device such as a hard disk unit or an optical recording medium recorder. Alternatively, the corrected image data may be output to outside via a network.

[0262] [Other Embodiments]

[0263] Any of the following configurations is employable in the present invention for performing desired color correction on image data.

[0264] (a) A computer is provided between an image input device and an image output device. The computer performs color correction on read image data, and then, the corrected image data is output.

[0265] (b) A color correction unit performing desired color correction is incorporated into a digital camera. An image is displayed on a print or a liquid crystal panel using the converted image data.

[0266] (c) A color correction unit performing desired color correction is incorporated into a printer. Image data input directly is subjected to the desired color correction, and is printed out.

[0267] Further, the functions of the apparatus of each of the above-described embodiments are previously written to a recording medium such as a ROM or a CD-ROM as a program. The recording medium is loaded into an image processing apparatus so that the program is executed by a micro processor. Thereby, the objects of the present invention are achieved.

[0268] In this case, the program read out from the recording medium realizes the above-described embodiments. Accordingly, the program and the recording medium on which the program is recorded are also included in the present invention.

[0269] The recording medium may be a semiconductor medium such as a ROM or a nonvolatile memory card, an optical medium such as a DVD, a MO disk, an MD, or a CD-R, or a magnetic medium such as a magnetic tape or a flexible disk.

[0270] Alternatively, the program may be stored in the storage device of a server computer and supplied directly therefrom via a communication network such as the Internet. In this case, the storage device of the server computer is also included in the recording medium of the present invention.

[0271] Further, the functions of the above-described embodiments are realized by not only executing the loaded program, but also performing processing in cooperation with an operating system or another application program based on the instructions of the program.

[0272] Further, in the case of providing use by an ASP (application service provider) that stores the above-described program in the storage device of a server computer, such as a magnetic disk, executes the program upon receiving an execution instruction from a user computer connected via a communication line such as the Internet, and returns the execution results to the user computer, the storage device of the server computer and the program are also included in the present invention.

[0273] By thus distributing the functions according to the above-described embodiments in the form of a program, costs, portability, and versatility can be improved.

[0274] The present invention is not limited to the specifically disclosed embodiments, and variations and modifications may be made without departing from the scope of the present invention.

[0275] The present application is based on Japanese priority applications No. 2002-348384, filed on Nov. 29, 2002, and No. 2003-376443, filed on Nov. 6, 2003, the entire contents of which are hereby incorporated by reference. 

What is claimed is:
 1. An apparatus for performing image processing on image data including a memory color, comprising: a characteristic value calculation part calculating a characteristic value from the image data; an area extraction part extracting a specific color area of a specific color and a background area thereof from the image data, using the characteristic value and color information of the memory color stored in a storage part; a target value calculation part calculating a target value for correcting a preferable color of the specific color from the characteristic value, the extracted specific color and background areas, and color information of the preferable color stored in the storage part; and an image data color correction part calculating a correction for correcting the preferable color based on the calculated target value and the characteristic value, and correcting a color of the specific color area based on the calculated correction and the characteristic value.
 2. The apparatus as claimed in claim 1, further comprising an attribute information obtaining part obtaining attribute information added to the image data, wherein said image data color correction part corrects the color of the specific color area based further on the obtained attribute information.
 3. The apparatus as claimed in claim 2, wherein the attribute information obtaining part obtains information on a condition for capturing the image data as the attribute information, the condition being one of a scene capture type, an F number, a shutter speed, white balance, and presence or absence of a flash.
 4. The apparatus as claimed in claim 3, wherein said image data color correction part corrects the color of the specific color area by multiplying the calculated correction by a correction factor set according to the condition for capturing the image data.
 5. The apparatus as claimed in claim 1, wherein said characteristic value calculation part splits the image data into a plurality of regions, and calculates, for each region, at least one of an average, a median, a mode, and a standard deviation in color information, and a percentage of the region in the image data.
 6. The apparatus as claimed in claim 1, wherein the color information of the preferable color of the memory color stored in the storage part comprises chromaticity coordinates in a color space and a range of the chromaticity coordinates.
 7. The apparatus as claimed in claim 1, wherein said target value calculation part sets an intersection of a straight line and an ellipsoid as the target value of the preferable color, the straight line being parallel to a slope of a segment connecting chromaticity coordinates of the background area and an origin, and passing through chromaticity coordinates of the preferable color of the specific color, the ellipsoid being formed by a range of the preferable color of the specific color.
 8. The apparatus as claimed in claim 7, wherein said image data color correction part corrects chromaticity coordinates of the specific color area of the image data by a predetermined distance calculated based on the characteristic value of the image data along an axis formed by the target value and the characteristic value of the specific color area.
 9. The apparatus as claimed in claim 8, wherein the predetermined distance is calculated based on a percentage of the specific color area in the image data.
 10. A method of performing image processing on image data including a memory color, the method comprising the steps of: (a) calculating a characteristic value from the image data; (b) extracting a specific color area of a specific color and a background area thereof from the image data, using the characteristic value and color information of the memory color stored in a storage part; (c) calculating a target value for correcting a preferable color of the specific color from the characteristic value, the extracted specific color and background areas, and color information of the preferable color stored in the storage part; and (d) calculating a correction for correcting the preferable color based on the calculated target value and the characteristic value, and correcting a color of the specific color area based on the calculated correction and the characteristic value.
 11. The method as claimed in claim 10, further comprising the step of (e) obtaining attribute information added to the image data, wherein said (d) corrects the color of the specific color area based further on the obtained attribute information.
 12. An apparatus for performing image processing on image data including a memory color, comprising: an area extraction part extracting a specific color area of a specific color and a background area thereof from the image data, using color information of the memory color stored in a storage part; a characteristic value calculation part calculating a characteristic value of at least one of the specific color area and the background area; a target value calculation part calculating a target value and a correction for correcting a preferable color of the specific color from a result of the calculation by said characteristic value calculation part and color information of the preferable color stored in the storage part; and an image data correction part correcting a color of the specific color area based on the correction calculated by said target value calculation part.
 13. The apparatus as claimed in claim 12, further comprising: an attribute information obtaining part obtaining image attribute information, wherein said target value calculation part calculates the target value and the correction for correcting the preferable color of the specific color further from the obtained image attribute information.
 14. The apparatus as claimed in claim 13, wherein the image attribute information relates to a condition for capturing the image data.
 15. The apparatus as claimed in claim 14, wherein said target value calculation part increases the correction when the condition for capturing the image data is a portrait mode.
 16. The apparatus as claimed in claim 12, wherein the characteristic value is a statistic of a color distribution of pixels in the specific color area for the specific color area, and is a statistic of a color distribution of pixels in the background area for the background area.
 17. The apparatus as claimed in claim 16, wherein each of the statistics employs at least one of a variance, a standard deviation, a median, a mode, and an average in a frequency distribution of the image data.
 18. The apparatus as claimed in claim 12, wherein the target value causes the color information of the preferable color of the specific color to shift toward the background area in accordance with the characteristic value.
 19. The apparatus as claimed in claim 12, wherein the target value is shiftable to a position dividing a segment connecting the color information of the preferable color of the specific color and a representative color of the background area proportionally in accordance with the characteristic value.
 20. The apparatus as claimed in claim 19, wherein the position dividing the segment proportionally is calculated from the characteristic value, the characteristic value being a hue distribution of the specific color area.
 21. The apparatus as claimed in claim 19, wherein the position dividing the segment proportionally is calculated from the characteristic value, the characteristic value being a chroma distribution of the specific color area.
 22. An apparatus for performing image processing on image data including a human image, comprising: an area extraction part extracting an area of a skin color and a background area thereof from the image data, using color information of a memory color stored in a storage part; a characteristic value calculation part calculating a characteristic value of at least one of the area of the skin color and the background area; a target value calculation part calculating a target value and a correction for correcting a preferable color of the skin color from a result of the calculation by said characteristic value calculation part and color information of the preferable color stored in the storage part; and an image data correction part correcting a color of the area of the skin color based on the correction calculated by said target value calculation part.
 23. The apparatus as claimed in claim 22, further comprising: an attribute information obtaining part obtaining image attribute information, wherein said target value calculation part calculates the target value and the correction for correcting the preferable color of the skin color further from the obtained image attribute information.
 24. A method of performing image processing on image data including a memory color, comprising the steps of: (a) extracting a specific color area of a specific color and a background area thereof from the image data, using color information of the memory color stored in a storage part; (b) calculating a characteristic value of at least one of the specific color area and the background area; (c) calculating a target value and a correction for correcting a preferable color of the specific color from a result of the calculation by said step (b) and color information of the preferable color stored in the storage part; and (d) correcting a color of the specific color area based on the correction calculated by said step (c).
 25. The method as claimed in claim 24, further comprising the step of (e) obtaining image attribute information, wherein said step (c) calculates the target value and the correction for correcting the preferable color of the specific color further from the obtained image attribute information.
 26. A method of performing image processing on image data including a human image, comprising the steps of: (a) extracting an area of a skin color and a background area thereof from the image data, using color information of a memory color stored in a storage part; (b) calculating a characteristic value of at least one of the area of the skin color and the background area; (c) calculating a target value and a correction for correcting a preferable color of the skin color from a result of the calculation by said step (b) and color information of the preferable color stored in the storage part; and (d) correcting a color of the area of the skin color based on the correction calculated by said step (c).
 27. The method as claimed in claim 26, further comprising the step of (e) obtaining image attribute information, wherein said step (c) calculates the target value and the correction for correcting the preferable color of the skin color further from the obtained image attribute information.
 28. A program for causing a computer to execute a method as set forth in claim
 10. 29. A program for causing a computer to execute a method as set forth in claim
 24. 30. A program for causing a computer to execute a method as set forth in claim
 26. 31. A computer-readable recording medium on which a program for causing a computer to execute a method as set forth in claim 10 is recorded.
 32. A computer-readable recording medium on which a program for causing a computer to execute a method as set forth in claim 24 is recorded.
 33. A computer-readable recording medium on which a program for causing a computer to execute a method as set forth in claim 26 is recorded. 